package org.dromara.system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.system.domain.DeviceCollect;
import org.dromara.system.domain.vo.DeviceCollectListVo;
import org.dromara.system.domain.vo.DeviceCollectVo;

import java.util.Collection;
import java.util.List;

/**
 * 设备收藏Mapper接口
 *
 * @author Lion Li
 * @date 2024-10-21
 */
public interface DeviceCollectMapper extends BaseMapperPlus<DeviceCollect, DeviceCollectVo> {

    int deleteDeviceCollect(@Param("userId") Long userId);

    int deviceCollect(@Param("userId") Long userId, @Param("ids") Collection<Long> ids);

    Page<DeviceCollectListVo> queryPageList(Page<DeviceCollectListVo> page, @Param("groupIds") Collection<Long> groupIds, @Param("deviceName") String deviceName, @Param("userId") Long userId);

    List<DeviceCollectListVo> selectDeviceList(@Param("userId") Long userId);

    int deviceCollectById(@Param("id") Long id);

//    int deleteDeviceCollectById(@Param("id") Long id);

    int deviceCollectById(@Param("userId") Long userId, @Param("id") Long id);

    int selectCollect(@Param("userId") Long userId, @Param("id") Long id);

    int deleteDeviceCollectById(@Param("userId") Long userId, @Param("id") Long id);

    int deviceCollects(@Param("ids") Collection<Long> ids);

    List<Long> getDeviceIds(@Param("userId") Long userId);

}
